#include "../DWMRICore/Point3F.h"

struct AData {
	float phiA;
	float phiB;
	float bValue;
	CVector3F *gradientOrientations;
	float lam3;
};

/* no S0 value, dwi = dwi / S0, gradients should be rotated by eigen vectors */
float ConmputeTwoTensorFittingResidual(float &lamda, float *dwi, CVector3F *gradients, const int n, 
	const float bValue, float *eval, float *evec, const float phiA, const float phiB);

CVector3F ComputeDirection(float *eval, float *evec, const float lamda, const float phi);